<?php include(__SITE_PATH.DS.'views/include/head.php'); ?>
<body>
<div id="wrappage">
    <div id="header" class="left">
        <?php include(__SITE_PATH.DS.'views/include/header.php');?>
    </div><!--End div.header-->
    <div id="container" class="left">
        <?php include(__SITE_PATH.DS.'views/include/sidebar.php');?>
        <div class ="content-right right">
			<div class="productview">
			<?php if(isset($notice)) echo '<div class="error"><p>'.$notice.'</p></div>';?>
			<?php if(isset($nxban)){?>
				<p class="submitButton">
					<a href="<?php echo Core::site_url('quanlysach/themmoinhaxuatban');?>">Thêm mới nhà xuất bản</a>
				</p>
				<?php $loaddanhmuc = new Model_Quanlysach();?>
				<table align="center" class="tbl-bookview tbl-catview" border="1" cellspacing="0" cellspacing="0">
					<tr>
						<th>STT</th>
						<th>Publisher ID</th>
						<th>Publisher Name</th>
						<th>Số sách theo nhà xuất bản</th>
					</tr>
					<?php $i=1;?>
					<?php while($row = $nxban->fetch_array()){?>
					<tr>
						<td align="center"><?php echo $i;$i++;?></td>
						<td><?php echo $row['PublisherID'];?></td>
						<td><a href="<?php echo Core::site_url('quanlysach/capnhatnhaxuatban/'.$row['PublisherID'].'/'.ham_loc_dau($row['PublisherName']));?>"><?php echo $row['PublisherName'];?></a></td>
						<td align="right"><?php echo $loaddanhmuc->getTotalPublichserID($row['PublisherID']);?></td>
					</tr>
					<?php }?>
				</table>
			<?php }?>
			</div>
        </div>            
    </div><!--End div.container-->
    <div class="clear"></div>
    <div id="footer" class="left">
        <?php include(__SITE_PATH.DS.'views/include/footer.php');?>
    </div><!--End div.footer-->
</div><!--End div#wrappage-->
</body>
</html>